<template>
  <div class="audition198">
    <p>方法一：</p>
    <v-md-preview :text="text1" />
    <p>方法二：</p>
    <v-md-preview :text="text2" />
  </div>
</template>

<script>
const prefix = '``` js'
const suffix = '```'
export default {
  name: 'Audition198',
  data() {
    return {
      text1: `${prefix}
      function del(arr) {
        var _arr = []
        arr.forEach(item => {
          _arr.includes(item) || _arr.push(item)
        })
        return _arr
      }
      \n${suffix}`,
      text2: `${prefix}
      function del(arr) {
        return Array.from(new Set(arr))
      }
      \n${suffix}`,
    }
  }
}
</script>

<style>

</style>